package com.intretech.tj.light;

import io.smallrye.config.ConfigMapping;
import io.smallrye.config.WithDefault;
import io.smallrye.config.WithName;

@ConfigMapping(prefix = "device.light")
public interface LightConfig {
    @WithName("run")
    @WithDefault("MQTT")
    String run();

    @WithName("listen")
    @WithDefault("device/light/data/")
    String ListenTopic();

    @WithName("allData")
    @WithDefault("device/light/etc")
    String AllDataTopic();

    @WithName("error")
    @WithDefault("error/light")
    String error();


    @WithName("default.red")
    int defaultRed();

    @WithName("default.green")
    int defaultGreen();

    @WithName("default.yellow")
    int defaultYellow();

    @WithName("default.reds")
    int[] defaultReds();

    @WithName("default.greens")
    int[] defaultGreens();

    @WithName("default.yellows")
    int[] defaultYellows();

    @WithName("tcp.address")
    @WithDefault("null")
    String TCPAddress();

    @WithName("tcp.message")
    @WithDefault("BBFF01%s%s%s%s%s%s00000000000000000000000000000002FB")
    String TCPMessage();

    @WithName("mqtt.publish")
    @WithDefault("device/light/publish/")
    String MQTTPublishTopic();

    @WithName("mqtt.update")
    @WithDefault("device/light/update")
    String MQTTUpdateTopic();

    // 新增：用于修改红绿灯信息的主题
    @WithName("mqtt.modify")
    @WithDefault("device/light/modify")
    String MQTTModifyTopic();

    // 新增：用于恢复红绿灯信息的主题
    @WithName("mqtt.recover")
    @WithDefault("device/light/recover")
    String MQTTRecoverTopic();
}
